home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / gcc / gcc261c.zoo / objects / Port.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-18  |  1.9 KB  |  62 lines

  1. /* Interface for abstract superclass port for use with Connection
  2.    Copyright (C) 1994 Free Software Foundation, Inc.
  3.    
  4.    Written by:  R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
  5.    Date: July 1994
  6.    
  7.    This file is part of the GNU Objective C Class Library.
  8.  
  9.    This library is free software; you can redistribute it and/or
  10.    modify it under the terms of the GNU Library General Public
  11.    License as published by the Free Software Foundation; either
  12.    version 2 of the License, or (at your option) any later version.
  13.    
  14.    This library is distributed in the hope that it will be useful,
  15.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17.    Library General Public License for more details.
  18.    
  19.    You should have received a copy of the GNU Library General Public
  20.    License along with this library; if not, write to the Free
  21.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22.    */ 
  23.  
  24. #ifndef __Port_h_OBJECTS_INCLUDE
  25. #define __Port_h_OBJECTS_INCLUDE
  26.  
  27. #include <objects/stdobjects.h>
  28. #include <objects/RetainingNotifier.h>
  29. #include <objects/Coding.h>
  30.  
  31. @class Connection;
  32.  
  33. @interface Port : RetainingNotifier <Coding>
  34.  
  35. /* xxx These will probably change */
  36. + newRegisteredPortWithName: (const char *)n;
  37. + newPortFromRegisterWithName: (const char *)n onHost: (const char *)host;
  38. + newPort;
  39.  
  40. /* xxx These sending and receiving interfaces will change */
  41.  
  42. - (int) sendPacket: (const char *)b length: (int)l
  43.    toPort: (Port*) remote;
  44. - (int) sendPacket: (const char *)b length: (int)l
  45.    toPort: (Port*)remote
  46.    timeout: (int) milliseconds;
  47.  
  48. - (int) receivePacket: (char*)b length: (int)l
  49.    fromPort: (Port**) remote;
  50. - (int) receivePacket: (char*)b length: (int)l
  51.    fromPort: (Port**) remote
  52.    timeout: (int) milliseconds;
  53.  
  54. - (BOOL) isSoft;
  55.  
  56. - (unsigned) hash;
  57. - (BOOL) isEqual: anotherPort;
  58.  
  59. @end
  60.  
  61. #endif /* __Port_h_OBJECTS_INCLUDE */
  62.